package lucky.xiong.实际工作问题;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.TypeReference;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.List;
import java.util.Map;

public class test {
    public static void main(String[] args) {
        String fileName = "C:\\Users\\l-xiongjianlin\\Desktop\\shuju.txt";
        int lineNumber = 10912;
        String jsonStr = "";
        try (BufferedReader br = new BufferedReader(new FileReader(fileName))) {
            String line;
            while ((line = br.readLine()) != null) {
                jsonStr = line;
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
        JSONArray jsonArray = JSONObject.parseObject(jsonStr).getJSONObject("Service").getJSONObject("Body").getJSONArray("EMP_ASG_IS13");
        List<Map<String, Object>> maps = JSON.parseObject(jsonArray.toJSONString(), new TypeReference<List<Map<String, Object>>>() {
        });

        for (Map<String, Object> map : maps) {
            if (!map.containsKey("POSITION_STATUS")){
                System.out.println(map.get("IDM_EMP_ACCOUNT"));
            }
        }
    }
}
